<div id="headerdiv">
<!-- /home -->
	<div id="icondiv"><a href="http://127.0.0.1:8888/hezi/index"><img src="/hezi/images/home.png" width="20"/></a></div>
<!-- /forumselect --> 
    <div id="forumselectdiv"> 
		<a id="forumselectorbtn" href="#" class="btn btn-large btn-block btn-primary">选择论坛</a> 
	</div>
 
<!-- /post category -->    
	<div id="categorydiv" class="btn-toolbar">
            <div class="btn-group">
                <a id="unviewedbtn" class="btn btn-primary postcategory unviewed" postcategory="unviewed">未浏览</a>
                <a id="markedunproecessedbtn" class="btn btn-primary postcategory markedunproecessed" 
                	postcategory="markedunproecessed" title="显示已标记但未处理的帖子">已标记</a>
                <a id="processedbtn" class="btn btn-primary postcategory processed" postcategory="processed">已处理</a>
                <a id="allbtn" class="btn btn-primary postcategory all" postcategory="all">全部</a> 
            </div>
    </div>

     
<!-- /change to image view --> 
	<div id="changeviewdiv">
    	<a id='columnshowbtn' href='/hezi/picwall' class='btn btn-large btn-block btn-primary'>切换到图片视图</a>
	</div>
    
    
<!-- /forums -->
    <div id="forumlistdiv" class="tooltip fade bottom in"> 
        <div class="tooltip-arrow"></div>
        <div class="tooltip-inner">
        <a class="forumgruop btn btn-block btn-primary" forumgroupid="allforum">所有论坛</a>
            <table border="0" style="vertical-align:top">
              <tr>
                #foreach($groupitem in $groupslist)
                <td class="noseprator" style="vertical-align:top">
                   <table border="0">
                   	  <!-- /group -->
                      <tr>
                        <td class="group" style="width:140px">
                        	<a class="forumgruop btn btn-block btn-primary" forumgroupid="$groupitem.id">$groupitem.name</a>
                        </td>
                      </tr>
                      
                      <!-- /forum -->
                      <tr class="count$forumitem.summary.newimagecount">
                          <td>
                          #foreach($forumitem in $groupitem.getForumsInThisGroup() )
                          <a id="viewforumbtn$forumitem.getId()" class="forum btn btn-primary" style="margin-left:30px; float:left;" 
                          	forumid="$forumitem.getId()">$forumitem.getId()<br>$forumitem.name</a>
                          #end
                          </td>
                      </tr>
                       
                    </table>
                </td>
                #end
              </tr>
            </table>
        </div>
    </div>

<!-- /message --> 
    <div id="messagediv"> 
        <span id="messagea" style="margin-left:10px">1111</span>
	</div>   
</div>

<script language="javascript">


$(function(){
	doforumselect();
	dopostcategory();

})


function doforumselect(){
	$("#forumselectorbtn").click(function(){
		$("#forumlistdiv").toggle();
	});
	
	
	$("a.forumgruop").click(function(){
		var id = $(this).attr("forumgroupid");
		console.log(id);
		window.location.href="/hezi/postlist?forumgroup=" + id;	
	});

	$("a.forum").click(function(){
		var id = $(this).attr("forumid");
		console.log(id);
		window.location.href="/hezi/postlist?forum=" + id;	
	});
	
	var forumstr = "$!forum.getId() $!forum.getName()";
	if(forumstr.length > 2){
		$("#forumselectorbtn").html(forumstr);
	}
}



function dopostcategory(){
	//postcategory切换菜单
	$('a.$postcategory').addClass("active");
	
	$("a.postcategory").click(function(){
		postcategory = $(this).attr("postcategory");
		window.location.href="/hezi/postlist?postcategory="+postcategory;		
	});
}



function notice(data){
	$("#messagea").html(data);	
	$("#messagediv").show();
			
}

function messagecallback(){
	$("#messagediv").show();
}

</script>
<style>
</style>
